
Ext.define('WebMeV.view.StartLoginForm', {
    extend: 'Ext.form.Panel',
    alias : 'widget.startloginform',
    id: 'start_login_form',
    title: 'Login',
    cls: 'corn',
    width : 278,
    autoHeight: true,
    frame: false,    
    bodyPadding:  '20',
    listeners: {
        render: function(p){
            p.getEl().select('.x-panel-body').setStyle('background','transparent');
            p.getEl().select('.x-panel-body').setStyle('border','none');          
        },
        'afterrender': function(cmp){
            var body = Ext.get(cmp.getEl().dom.childNodes[1].id);
            body.applyStyles('border:none');
            var header_text = Ext.get(cmp.getEl().dom.childNodes[0].id + '_hd-textEl');
            header_text.applyStyles("color:GoldenRod;font-size:16px;font-weight:normal;font-family:arial;border-color:red");
        }
    },

    defaults: {
        anchor: '95%',
        allowBlank: false,
        msgTarget: 'side',
        labelWidth: 75,
        style: 'font-family: Georgia, serif;font-weight:normal;background-image:none;'
    },

    items: [{
        xtype: 'textfield',
        name: 'userId',
        fieldLabel: 'User Id'
    },{
        xtype: 'textfield',
        name: 'password',
        fieldLabel: 'Password',
        inputType: 'password'
    }],

    buttons: [{
        text: 'Submit',
        //style: 'margin-right: 10px',
        action: 'login'
    },
    {
        text: 'Reset Form',
        style: 'font-family: Georgia, serif;margin-right: 30px',
        handler: function() {
            this.up('form').getForm().reset();
        }
    }]
});
